package com.delu.config;

import java.io.FileWriter;
import java.io.IOException;

public class AlipayConfig {

    //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "2021000118651868";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCLYzAKOGkzfd/0kiRJNjGgMJaWnFJB+OMt4M1Pwq0TY+G614yely88bNsUnLpUwKfRWfYVftcWbaSV3t4BbukUCl7RI5znpVOIi2J6kuQwEr7ho5mlvMUQkJeBEXAqKkN3dKcemjcJUQ5Czmnfc4NLBNQYp0YnSXEt1mhdOUH5Vz7V1wJZPMk5Pa9PP8b7dnLAk1iMO8jhAuNLn1/D7nqXKK9PnPf3gJk48Fhf4BGF0bktvYMrAFvNN9MtlJcbu07x/wJyCfHKOIp0eFOi6BswqifgKd25krVTmGnoxVRCM7V1BirWWCCKk1wEHvWaeiEhRCNaYGdf1dvDfuJ8BhkXAgMBAAECggEAVyOkJc+MXSeFOfWe/7IEpjuZ+QAzIJFDHSxbzlBLOUMJHHCitYaYfjMjZyhwCIoEoAmYoWmRd7EF4rfYnJbE2cV970tPTTX7GfLhlvV7+F3PvWo0pPt1S1zJimPndkTDtstTqvsICygEPVmjsJEbdGvJWLxCTE9KlThkOFuSVhj7qFRdlBu/77qUwoKwXSQZ48xA3dlOx8mmGgg7DO3LEF8xdXQbNhP2pmUGUBu16cyiJYuDbRH/H+nXXzPqb29xVFzAKFiksZGi+KVJgxxOdIQx/2ZmYrPYaTVV7m3YktdrT5Pm00nagLhONybgh4SXaSjRBUuvIYjgJAEcR1DwkQKBgQDBzJ5EzYipgGK0p9alzi/nZEmIbV+fXjuPb7FTljdmIgeo8aNwuiRzCgvvgqig3cF7ziT6nJWdeCJ9JIMu1U9wSJAKgbhjSdtffEiTza1c3w34fcRZE7fyylGX7qjqu0xY61wZgYLhPSX0yl9U2MbbkIxQhPTCSomOyxe6wDpuPwKBgQC4H9vyeOgXRxH5So7LlqHB1xq9fmCENGQHqa3FQ+9m/zC4wkaHSEMevTsk+BJbK+yzGmqiKIXfWvT8mliPKZYMI2tA9lfcZ3fzdsA8DA2qHOH4KgpbQiLYmUYgM4JsHAa4ib6FriE40CfsGxTJz9iBhP6qeZ2g9tTI6BMTdhtPKQKBgEYlMtACeMmpP5DWAxpGdA5TvU3VELxVVkeHjO6NO4YLISykMZ02ssS0yTcq2rBHM6YFKltPW9QATLNxCM5lxPgGO6Sh6UR+0hlQmdBtrKcl0R+1HeGEAputYTUV3CwCGRNCNTbCKsYt5NQif7jtMaT9P9xRE2pTolB98BvXQg7vAoGBAJjwdb0Zqwcy1H4y7Ru02lXtu9ts7vTBo9ktmxbBUElIbYr6bKUQZBhTbJ5PpMewW6OFrM9XQ6P8pIRyHF+GVolsnjlOpjqAg4VqvVDjXjJQXW7KVOHqtJEf97zlrE7qlLaSS/w0YIoVdSPMdt8PUzJ6ayLldAZxINxk0PuYXiTJAoGBAJEXS2piJy27rJb91KDVMIEvwk+uysDNxAQEHUVqrd8ajkOvc8zlVUbCycQmmFs4//6C597WXsk+b+AN3Dzczp22Cgjr86gWGu8uPeY00BuaTq8tuwDrQcd8J/imyB2IVr2bHhlRR3cyoQuohD9hUIRzoadWUFLBIUGsMAd+TVXs";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArNyZcsELSHjhfdF3KDOZFEEg/QUr+4+VCziZaucapVMQy1nwfCWub7JzGr0xJYF4cavBokEH8q0VH5O4vohie4pSeXbF59GkYLJJTqE+oBYJ2l0V4Fc7imDvbWVLtdJ4Zrt3p+RZJDg5AjSVu0xoQo0HhvJKhA3wXV38htI2KvbW0s1YoFguJy2IWIvwKD2nzNIc5tIGR9tfT7kMHs9uQ1ehRGjTbuMpLnBJFoYza8bgPBNFB4uxBBbYPoSfE/91hSsMvOme1g805Ebgyd1mZ7n9SUs6XhpjiR8Or+R++OKRCVOt0HO09ZHqlt7P21He4+oc1mShOkLwfMpAhPG50wIDAQAB";

    // 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://4d565872h0.zicp.vip/returnBack/notifyUrl";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://4d565872h0.zicp.vip/returnBack/returnUrl";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关
    public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "D:\\logs";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}



